home *** CD-ROM | disk | FTP | other *** search
- // vertex shader to combine ground shadow texture with model drawing (ground shadows only)
-
- vs_1_1 // version
- dcl_position v0 // position
- dcl_normal v3 // normal
- dcl_color v6 // vertex color
- dcl_texcoord v7 // texture coordinates
-
- m4x4 r0, v0, c0 // transform by matrix at c0 to get position for rendering
- mov oPos,r0
-
- // oFog = (fogend - dist) / (fogend-fogstart)
- sub r1.x,c7.x,r0.w
- mul oFog,r1.x,c7.y
-
- mov oT0,v7 // move the texture coordinate to output
-
- mov r0,v3 // normal isnt normal, it's used for shadow buffer projection coordinates
- mov oT1,r0 // store in texture coords for stage 1
-
- mov oD0,v6 // pass the color along to the pixel shader
-
-